/// @tags: StirlingNumber stirlingUnsign
#include <algorithm>
#include <cstdio>
#include <iostream>

using namespace std;

namespace BlueQuantum {

typedef long long ll;

int const N = 1 << 19, P = 167772161;

inline ll qpow(ll base, int exp) {
  ll res = 1;
  while (exp) {
    if (exp & 1) res = res * base % P;
    base = base * base % P;
    exp >>= 1;
  }
  return res;
}

int const g = 3, ig = qpow(g, P - 2);

int n;
int cvt[N];
ll inv[N], fac[N];
ll F[N], G[N];

inline void NTT(ll *f, int n, bool typ) {
  for (int i = 1; i < n; ++i)
    if (i < cvt[i]) swap(f[i], f[cvt[i]]);
  for (int i = 2; i <= n; i <<= 1) {
    int mid = (i >> 1), w = qpow(typ ? g : ig, (P - 1) / i);
    for (int j = 0; j < n; j += i) {
      ll wk = 1;
      for (int k = 0; k < mid; ++k, wk = wk * w % P) {
        ll tmp = f[j + k + mid] * wk % P;
        if ((f[j + k + mid] = f[j + k] - tmp) < 0) f[j + k + mid] += P;
        if ((f[j + k] += tmp) >= P) f[j + k] -= P;
      }
    }
  }
  if (!typ) {
    ll inv = qpow(n, P - 2);
    for (int i = 0; i < n; ++i) f[i] = (f[i] * inv) % P;
  }
}

void multiply(ll *f, ll *g, int n, int m) {
  m += n, n = 1;
  while (n < m) n <<= 1;
  for (int i = 0; i < n; ++i) cvt[i] = (cvt[i >> 1] >> 1) | ((i & 1) ? (n >> 1) : 0);
  NTT(f, n, true);
  NTT(g, n, true);
  for (int i = 0; i < n; ++i) f[i] = f[i] * g[i] % P;
  NTT(f, n, false);
}

/// @param n 次数
void solve(ll *f, int n) {
  static ll a[N], b[N];
  if (n == 1) return f[1] = 1, void();
  if (n & 1) {
    solve(f, n - 1);
    for (int i = n; i; --i) f[i] = (f[i - 1] + f[i] * (n - 1) % P) % P;
    /// @note f[0]一直为0
    // f[0] = f[0] * (m - 1) % P;
  } else {
    int mid = n / 2;
    solve(f, mid);
    ll tmp = 1;
    for (int i = 0; i <= mid; ++i)
      a[i] = f[i] * fac[i] % P, b[i] = tmp * inv[i] % P, tmp = tmp * mid % P;
    reverse(a, a + mid + 1);
    multiply(a, b, mid + 1, mid + 1);
    for (int i = 0; i <= mid; ++i) G[i] = inv[i] * a[mid - i] % P;
    multiply(f, G, mid + 1, mid + 1);
    int limit = 1;
    while (limit < (mid + 1) << 1) limit <<= 1;
    for (int i = mid + 1; i < limit; ++i) a[i] = b[i] = G[i] = 0;
    for (int i = n + 1; i < limit; ++i) f[i] = 0;
  }
}

inline void prework(int n) {
  fac[0] = 1;
  for (int i = 1; i <= n; ++i) fac[i] = fac[i - 1] * i % P;
  inv[n] = qpow(fac[n], P - 2);
  for (int i = n - 1; ~i; --i) inv[i] = inv[i + 1] * (i + 1) % P;
}

inline int main() {
  cin >> n;
  prework(n << 1);
  solve(F, n);
  for (int i = 0; i <= n; ++i) cout << F[i] << ' ';
  return 0;
}

}  // namespace BlueQuantum

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("/tmp/CodeTmp/testdata.in", "r", stdin);
  freopen("/tmp/CodeTmp/testdata.out", "w", stdout);
#else
  freopen("StirlingUnsigned.in", "r", stdin);
  freopen("StirlingUnsigned.out", "w", stdout);
#endif
#endif

  ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  return BlueQuantum::main();
}
